﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using DevExpress.XtraEditors.Repository;

namespace WmsApp.StaticData.Unity
{
    public static class SubjectFactory
    {     
        private static readonly ISubject Subject;
        static SubjectFactory()
        {
            Subject = new UnitySubject();
        }
        public static ISubject GetSubject()
        {
            return Subject;
        }

        public static void AddObserverToSubject(BaseObserver observer) 
        {
            var subject = GetSubject();
            subject.Attach(observer);
        }
    }
}
